import { v4 as uuidv4 } from 'uuid'
export const getUUID = () => {
	//先从本地存储获取userId（看一下本地存储里是否有该ID）
	let userId = localStorage.getItem('USERTEMPID')
	//如果没有则生成一个userId
	if (!userId) {
		userId = uuidv4()
		//本地存储该生成的Id
		userId = localStorage.setItem('USERTEMPID', userId)
	}
	return userId
}